<?php require_once($_SERVER['DOCUMENT_ROOT']."/defaultconf.mex");
require_once($GLOBALS['PAD'].'Modules/CentrodeCustos/modconf.php');
	 MYDCONN();
	$GLOBALS['MYT'] = $GLOBALS['MYD'];
    form_pr('getExtract','','','post');
	mn_field('hidden','ED','jB','221','','','','');  ?>
	<div class="title">Consulta</div>
<table width="100%"  border="0" cellpadding="3" cellspacing="1">
    <tr bgcolor="#F2F2F2">
      <td width="30%">De:
      <?php mn_field('date','ED','TimeStart','','getExtract','10','',''); ?>
        a
      <?php mn_field('date','ED','TimeEnd','','getExtract','10','',''); ?></td>
      <td>Conta: 
      <?php mn_field('text','ED','code','','','6','',''); ?></td>
      <td>Estado
      <?php 
      	mn_field('hselect','ED','Status','',"Lan&ccedilado;Pago;Arquivado;Cancelado#1;2;3;5",'','',''); ?></td>
      <td>Data
      <?php 
      	mn_field('hselect','ED','TimeType','',"Pagamento;Limite de Pagamento;Emiss&atildeo;Lan&ccedilamento#TimeClose;TimePay;TimeInvoice;Time",'','',''); ?></td>
      <td>N. Interno
      <?php mn_field('text','ED','Invoice','','','6','',''); ?></td>
      <td>Valor
      <?php mn_field('text','ED','Amount','','','10','',''); ?></td>
      <td>N. Factura
      <?php mn_field('text','ED','IReference','','','8','',''); ?></td>
    </tr>
    <tr bgcolor="#F2F2F2">
    <td colspan="6">Fornecedor
    <?php mn_field('select','ED','Provider','',"SELECT k.Ref AS ID, k.name AS NAME
	  			FROM ccenter_providerscodes AS o
				INNER JOIN ccenter_providers AS k ON k.Ref = o.RefProvider
				WHERE Status != 5
				GROUP BY k.ref
				ORDER BY k.name ASC",' ','',''); ?></td>
    <td><?php mn_field('button','ED','getSubmit','Pesquisar','','','','" onclick="
    		document.getExtract.action=\'Modules/CentrodeCustos/Lib/rs_extract.php\';
			subform(\'getExtract\',\'rs_extract\');');
			mn_field('button','ED','getSubmit','Imprimir','','','','" onclick="newprint(\'rs_extract\');'); ?></td>
    </tr>
</table>
</form>
<div id="rs_extract"></div>